package com.zds.support.api

import com.zds.support.api.resp.*
import com.zds.support.api.retrofit.response.ApiOperaterResponse
import com.zds.support.api.retrofit.response.ApiResponse
import io.reactivex.Observable
import okhttp3.MultipartBody
import retrofit2.http.*

interface ApiService {

    @POST("/app/site_user/login")
    fun login(@Body map: HashMap<String, Any>): Observable<ApiResponse<LoginResp>>

    @POST("/app/site/register")
    fun register(@Body map: HashMap<String, Any>): Observable<ApiResponse<LoginResp>>

    @POST("/app/site/load_statistic_info")
    fun getInfo(): Observable<ApiResponse<MyInfoResp>>

    @FormUrlEncoded
    @POST("/app/order_df/cancel_take")
    fun cancelTake(@Field("code")  code:String): Observable<ApiOperaterResponse>

    @POST("/app/order_df/list_my_create")
    fun listMyCreate(@Body map: HashMap<String, Any>): Observable<ApiResponse<ListMyCreateResp>>

    @POST("/app/order_df/list_my_take")
    fun listMyTake(@Body map: HashMap<String, Any>): Observable<ApiResponse<ListMyCreateResp>>

    @POST("/app/order_df/list_wait_take")
    fun listWaitTake(@Body map: HashMap<String, Any>): Observable<ApiResponse<ListMyCreateResp>>

    @POST("/app/order_df/pay")
    fun dfPay(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/order_df/process_list")
    fun processList(@Body map: HashMap<String, Any>): Observable<ApiResponse<ProcessListResp>>

    @POST("/app/order_df/re_pay")
    fun rePay(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @FormUrlEncoded
    @POST("/app/order_df/take")
    fun dfTake(@Field("code")  code:String): Observable<ApiOperaterResponse>

    @POST("/app/order_ds/auto_confirm")
    fun autoConfirm(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/order_ds/list_my_create")
    fun listDsMyCreate(@Body map: HashMap<String, Any>): Observable<ApiResponse<ListMyCreateResp>>

    @POST("/app/order_ds/list_my_take")
    fun listDsMyTake(@Body map: HashMap<String, Any>): Observable<ApiResponse<DsMyTakeListResp>>

    @POST("/app/order_ds/list_wait_take")
    fun listDsWaitTake(@Body map: HashMap<String, Any>): Observable<ApiResponse<DsWaitTake>>

    @POST("/app/order_ds/process_list")
    fun dsProcessList(@Body map: HashMap<String, Any>): Observable<ApiResponse<ProcessListResp>>

    @FormUrlEncoded
    @POST("/app/order_ds/take")
    fun dsTake(@Field("code")  code:String): Observable<ApiOperaterResponse>

    @POST("/app/order_ds/take_confirm")
    fun dsTakeConfirm(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/brokerage_flow/list")
    fun brokerageFlowList(@Body map: HashMap<String, Any>): Observable<ApiResponse<BrokerageFlowResp>>

    @POST("/app/notice/list")
    fun noticeList(@Body map: HashMap<String, Any>): Observable<ApiResponse<NoticeResp>>

    @POST("/app/site/promote_link")
    fun tgm(): Observable<ApiResponse<String>>

    @POST("/app/dictionary/list")
    fun dictionaryList(): Observable<ApiResponse<Dict>>

    @POST("/app/site/list")
    fun siteList(@Body map: HashMap<String, Any>): Observable<ApiResponse<MySiteListResp>>

    @POST("/app/dictionary/dictMap")
    fun dictionaryAll(): Observable<ApiResponse<DictionarALlRep>>

    @POST("/app/file/upload")
    @Multipart
    fun upload(@Part file: MultipartBody.Part): Observable<ApiResponse<ImagePath>>

    @POST("/app/todo/info")
    fun todoInfo(): Observable<ApiResponse<TodoInfoResp>>

    @POST("/app/site_qr_code/add")
    fun addQrCode(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/site_qr_code/del")
    fun delQrCode(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/site_qr_code/edit")
    fun editQrCode(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/site_qr_code/edit_device_id")
    fun editDevice(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/site_qr_code/edit_status")
    fun editStatus(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/site_qr_code/list")
    fun qrCodeList(@Body map: HashMap<String, Any>): Observable<ApiResponse<QrCodeResp>>

    @POST("/app/site_user/edit_self_pwd")
    fun editPwd(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/site_user/load_self")
    fun editUser(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/site/edit_status")
    fun editUserStatus(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @GET("/app/captcha")
    fun captcha(): Observable<ApiResponse<CaptchaResp>>

    @POST("/app/ac_change_flow/list")
    fun changeFlowList(@Body map: HashMap<String, Any>): Observable<ApiResponse<ChangeFlowResp>>

    @POST("/app/site_channel/list_self")
    fun siteChannelList(): Observable<ApiResponse<SiteChannelResp>>

    @POST("/app/site_channel/edit_ds_status")
    fun siteChannelDsStatus(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/site_channel/edit_df_status")
    fun siteChannelDfStatus(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/bank/list")
    fun bankList(@Body map: HashMap<String, Any>): Observable<ApiResponse<BankListResp>>

    @POST("/app/notice/list")
    fun msgList(@Body map: HashMap<String, Any>): Observable<ApiResponse<MsgListResp>>

    @POST("/app/site/edit_self_ds_auto_take_switch")
    fun autoTake(@Body map: HashMap<String, Any>): Observable<ApiOperaterResponse>

    @POST("/app/site/load_ds_auto_take_switch")
    fun loadAutoTakeSwitch(): Observable<ApiResponse<String>>

    @FormUrlEncoded
    @POST("/app/site_qr_code/online_device_id")
    fun onlineDeviceId(@Field("deviceId")  deviceId:String): Observable<ApiOperaterResponse>
}